cmake_minimum_required(VERSION 3.24.0)
project(bit-field-calculator LANGUAGES CXX)

find_package(Qt5 COMPONENTS Core Widgets REQUIRED)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

include_directories(. ${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})

if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
    set(FLAG WIN32)
endif()

add_executable(${PROJECT_NAME} ${FLAG}
    main.cpp
    bitFieldCalculator.cpp
    bitFieldCalculator.ui
)

target_link_libraries(${PROJECT_NAME} ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES})
